package com.avril.entity;

import com.avril.util.ValidationManager;

public class Goods {
	int goodsId;
	String goodsCode;
	GoodsType goodsType;
	String goodsName;
	float inPrice;
	float outPrice;
	String location;
	int amount;

	public int getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(int goodsId) {
		this.goodsId = goodsId;
	}

	public String getGoodsCode() {
		return goodsCode;
	}

	public void setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
	}

	public GoodsType getGoodsType() {
		return goodsType;
	}

	public void setGoodsType(GoodsType goodsType) {
		this.goodsType = goodsType;
	}

	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public float getInPrice() {
		return inPrice;
	}

	public void setInPrice(float inPrice) {
		this.inPrice = inPrice;
	}

	public float getOutPrice() {
		return outPrice;
	}

	public void setOutPrice(float outPrice) {
		this.outPrice = outPrice;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public int getAmount() {
		return amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	public Object getGoodsValue(int row, int col) {
		switch (col) {
		case 0:
			return ++row + "";
		case 1:
			return ValidationManager.changeNull(getGoodsCode());
		case 2:
			return ValidationManager.changeNull(getGoodsName());
		case 3:
			return ValidationManager.changeNull(getGoodsType().getTypeName());
		case 4:
			return ValidationManager.changeNull(getInPrice());
		case 5:
			return ValidationManager.changeNull(getOutPrice());
		case 6:
			return ValidationManager.changeNull(getAmount());
		case 7:
			return ValidationManager.changeNull(getLocation());
		}
		return null;
	}

}
